package com.luke.base.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luke.base.mapper.RetrieveAlarmMapper;
import com.luke.base.domain.RetrieveAlarm;
import com.luke.base.service.IRetrieveAlarmService;

/**
 * 报警信息Service业务层处理
 * 
 * @author luke
 * @date 2021-08-23
 */
@Service
public class RetrieveAlarmServiceImpl implements IRetrieveAlarmService 
{
    @Autowired
    private RetrieveAlarmMapper retrieveAlarmMapper;

    /**
     * 查询报警信息
     * 
     * @param id 报警信息ID
     * @return 报警信息
     */
    @Override
    public RetrieveAlarm selectRetrieveAlarmById(Long id)
    {
        return retrieveAlarmMapper.selectRetrieveAlarmById(id);
    }

    /**
     * 查询报警信息列表
     * 
     * @param retrieveAlarm 报警信息
     * @return 报警信息
     */
    @Override
    public List<RetrieveAlarm> selectRetrieveAlarmList(RetrieveAlarm retrieveAlarm)
    {
        return retrieveAlarmMapper.selectRetrieveAlarmList(retrieveAlarm);
    }

    /**
     * 新增报警信息
     * 
     * @param retrieveAlarm 报警信息
     * @return 结果
     */
    @Override
    public int insertRetrieveAlarm(RetrieveAlarm retrieveAlarm)
    {
        return retrieveAlarmMapper.insertRetrieveAlarm(retrieveAlarm);
    }

    @Override
    public List<RetrieveAlarm> selectRetrieveAlarmListByUserIds(List<Long> userIdList) {
        return retrieveAlarmMapper.selectRetrieveAlarmListByUserIds(userIdList);
    }

    @Override
    public int alarmRead(Long alarmId) {
        return retrieveAlarmMapper.alarmRead(alarmId);
    }

}
